<!-- (Re)Defines a bunch of LaTeX commands that can then be used directly in the .Rmd file as '\command{...}' -->
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  TeX: {
    /* This enables color macros */
    extensions: ["color.js"],
    Macros: {
      /* Probability & mathematical symbols */
      Pr: "{\\style{font-family:inherit; font-size: 110%;}{\\text{Pr}}}",
      exp: "{\\style{font-family:inherit; font-size: 105%;}{\\text{exp}}}",
      log: "{\\style{font-family:inherit; font-size: 105%;}{\\text{log}}}",
      ln: "{\\style{font-family:inherit; font-size: 105%;}{\\text{ln}}}",
      logit: "{\\style{font-family:inherit; font-size: 100%;}{\\text{logit}}}",
      HR: "{\\style{font-family:inherit; font-size: 105%;}{\\text{HR}}}",
      OR: "{\\style{font-family:inherit; font-size: 105%;}{\\text{OR}}}",
      E: "{\\style{font-family:inherit; font-size: 105%;}{\\text{E}}}",
      Var: "{\\style{font-family:inherit; font-size: 105%;}{\\text{Var}}}",
      Cov: "{\\style{font-family:inherit; font-size: 105%;}{\\text{Cov}}}",
      Corr: "{\\style{font-family:inherit; font-size: 105%;}{\\text{Corr}}}",
      DIC: "{\\style{font-family:inherit; font-size: 105%;}{\\text{DIC}}}",
      se: "{\\style{font-family:inherit; font-size: 100%;}{\\text{se}}}",
      sd: "{\\style{font-family:inherit; font-size: 100%;}{\\text{sd}}}",
      kld: "{\\style{font-family:inherit; font-size: 100%;}{\\text{KLD}}}",
      with: "{\\style{font-family:inherit; font-size: 100%;}{\\text{with}}}",
      /* Distributions */
      dnorm: "{\\style{font-family:inherit;}{\\text{Normal}}}",
      dt: "{\\style{font-family:inherit;}{\\text{t}}}",
      ddirch: "{\\style{font-family:inherit;}{\\text{Dirichlet}}}",
      dmulti: "{\\style{font-family:inherit;}{\\text{Multinomial}}}",
      dbeta: "{\\style{font-family:inherit;}{\\text{Beta}}}",
      dgamma: "{\\style{font-family:inherit;}{\\text{Gamma}}}",
      dbern: "{\\style{font-family:inherit;}{\\text{Bernoulli}}}",
      dbin: "{\\style{font-family:inherit;}{\\text{Binomial}}}",
      dpois: "{\\style{font-family:inherit;}{\\text{Poisson}}}",
      dweib: "{\\style{font-family:inherit;}{\\text{Weibull}}}",
      dexp: "{\\style{font-family:inherit;}{\\text{Exponential}}}",
      dlnorm: "{\\style{font-family:inherit;}{\\text{logNormal}}}",
      dunif: "{\\style{font-family:inherit;}{\\text{Uniform}}}",
      /* LaTeX formatting */
      bm: ["{\\boldsymbol #1}",1],
      /* These create macros to typeset numbers in maths with the basic font */
      0: "{\\style{font-family:inherit; font-size: 105%;}{\\text{0}}}",
      1: "{\\style{font-family:inherit; font-size: 105%;}{\\text{1}}}",
      2: "{\\style{font-family:inherit; font-size: 105%;}{\\text{2}}}",
      3: "{\\style{font-family:inherit; font-size: 105%;}{\\text{3}}}",
      4: "{\\style{font-family:inherit; font-size: 105%;}{\\text{4}}}",
      5: "{\\style{font-family:inherit; font-size: 105%;}{\\text{5}}}",
      6: "{\\style{font-family:inherit; font-size: 105%;}{\\text{6}}}",
      7: "{\\style{font-family:inherit; font-size: 105%;}{\\text{7}}}",
      8: "{\\style{font-family:inherit; font-size: 105%;}{\\text{8}}}",
      9: "{\\style{font-family:inherit; font-size: 105%;}{\\text{9}}}",
      /* Health economics quantities */
      icer: "{\\style{font-family:inherit; font-size: 100%;}{\\text{ICER}}}",
      nb: "{\\style{font-family:inherit; font-size: 100%;}{\\text{NB}}}",
      ol: "{\\style{font-family:inherit; font-size: 100%;}{\\text{OL}}}",
      ceac: "{\\style{font-family:inherit; font-size: 100%;}{\\text{CEAC}}}",
      evpi: "{\\style{font-family:inherit; font-size: 100%;}{\\text{EVPI}}}",
      evppi: "{\\style{font-family:inherit; font-size: 100%;}{\\text{EVPPI}}}",
      evsi: "{\\style{font-family:inherit; font-size: 100%;}{\\text{EVSI}}}"
    }
  }
});
</script>
